#!/usr/local/bin/python3
# -*- coding: UTF-8 -*-
"""
@author:apple
@file:SuperDemo01.py
@time:2021/09/16
"""


def mysuper(tp01,ty02):
    """
    如果 ty02 是实例对象 ，则先判断 isinstance(ty02, tp01),如果不成立，返回


    """
    if isinstance(ty02,tp01):
        ...
        c = type(tp01)
        for cls in c.mro():
            ...

    elif issubclass(ty02,tp01):
        ...

    else:
        return None

class A:
    ...
    def test01(self):
        ...
        # super 根据 self 的 mro的顺序进行查找
        s = super(A, self)
        print(type(s))
        s.test01()


class B:
    def test01(self):
        ...
        print("B")

class C(A, B):
    ...



if __name__ == '__main__':
    pass
    c = C()
    c.test01()
    print(C.mro())

